Questions 01: Who is Conquering Extreme Poverty in Various Global Regions Across Time? How does the distribution of wealth differ among various income groups?
Visualization
Plot 01 : Stacked Bar Chart to know Poverty Trends over the year in the World
Visualization Descriptions:
Plot 02 : Ridge Plot for Wealth Distribution Analysis:
A ‘Ridge Plot’ is a great tool to compare the distribution of a continuous variable between groups; in this case, the distribution of wealth as determined by s80_s20_ratio, gini, and palma_ratio among different income groups. “Ridge plots” are just a set of vertically arranged, slightly overlapped density charts for every group. It is simpler to compare the distributions and see trends or outlines with this setup in place.
Dependency Columns:
For Plot 02 dependent columns are gini, palma_ratio and s80_s20_ratio
Visualization Descriptions:
Discussion
References
[1] Source Data link : https://ourworldindata.org/grapher/world-population-in-extreme-poverty-absolute?time=earliest..2015
Source Code
---title: "Global Poverty Trends: A Comprehensive Dataset for Research and Development"subtitle: "INFO 526 - Project Final"author: - name: "InsightArchitect - Ayesha, Shreemithra, Anusha, Eeshaan, Kaarthik, Amaan" affiliations: - name: "School of Information, University of Arizona"description: "Project description"format: html: code-tools: true code-overflow: wrap embed-resources: trueeditor: visualexecute: warning: false echo: false---## Abstract## Introduction```{r}#| label: load-pkgs#| message: false#| echo: falselibrary(tidyverse, png)library(ggplot2)library(dplyr)library(scales) library(tidyr)#install.packages("gganimate")library(gganimate)``````{r}#| label: load-dataset#| message: false#| warning: false#| echo: falsepip_row_data <-read.csv('data/pip_dataset.csv')ex_pro_data <-read.csv('data/globalextremepovertyrate_world-bank2020.csv')```## Justification of approach## Questions 01: Who is Conquering Extreme Poverty in Various Global Regions Across Time? How does the distribution of wealth differ among various income groups?### Visualization#### Plot 01 : Stacked Bar Chart to know Poverty Trends over the year in the World```{r}#| label: stacked-bar-chart#| message: false#| warning: false#| echo: false# Filter the data to include only specified yearsyears_to_include <-c(1820, 1850, 1870, 1890, 1910, 1929, 1950, 1960, 1970, 1980:2017)ex_pro_data_filtered <- ex_pro_data %>%filter(Year %in% years_to_include) %>%mutate(Year =factor(Year, levels = years_to_include)) # Transform data for plotting in a long format suitable for ggplot2ex_pro_data_long <-pivot_longer( ex_pro_data_filtered,cols =c( "Number.of.people.living.in.extreme.poverty", "Number.of.people.not.living.in.extreme.poverty"),names_to ="Status",values_to ="Count") %>%mutate(Count = Count /1e9, Status =recode(Status,"Number.of.people.living.in.extreme.poverty"="Population Live In Extreme Poverty","Number.of.people.not.living.in.extreme.poverty"="Population Live Not in Extreme Poverty"))# Stacked Bar Chart with counts on barsstacked_absolute_bar_chart <-ggplot(ex_pro_data_long, aes(x = Year, y = Count, fill = Status)) +geom_bar(stat ="identity") +geom_text(aes(label = scales::comma(Count, accuracy =0.1), group = Status),position =position_stack(vjust =0.5), color ="black", size =4 ) +labs(title ="Polulation Living in Extreme Poverty Level Around the World",subtitle ="Year: (1820-2017)",caption ="Data source: Ravallion (2016) updated with World Bank (2019) \nLink: OurWorldInData.org/poverty",x ="Year", y ="Number of Population (Billions)",fill ="Status") +theme_minimal() +theme(legend.position ="bottom",plot.title =element_text(size =20, face ="bold", hjust =0.5),plot.subtitle =element_text(size =18, face ="bold", hjust =0.5),plot.caption =element_text(size =10, hjust =1)) # save the plotsggsave("images/stacked_absolute_bar_chart.png", stacked_absolute_bar_chart, width =17, height =8, bg="white")# Animated Plotanimated_plot <- stacked_absolute_bar_chart +transition_layers(layer_length =1, transition_length =2, keep_layers =TRUE ) +enter_fade() +enter_drift(x_mod =1, y_mod =-1) +exit_fade() +ease_aes('linear') # Render the animation#anim_save("images/animated_stacked_bar_chart02.gif", # animated_plot, # width = 1100, # height = 600, # fps = 10, # duration = 15)```<img src="images/animated_stacked_bar_chart02.gif" alt="Stacked Bar Chart of Population by Poverty Status" width="100%"/>**Visualization Descriptions:**#### Plot 02 : Ridge Plot for Wealth Distribution Analysis:A 'Ridge Plot' is a great tool to compare the distribution of a continuous variable between groups; in this case, the distribution of wealth as determined by `s80_s20_ratio`, `gini`, and `palma_ratio` among different income groups. "Ridge plots" are just a set of vertically arranged, slightly overlapped density charts for every group. It is simpler to compare the distributions and see trends or outlines with this setup in place.**Dependency Columns:**For Plot 02 dependent columns are **`gini`**, **`palma_ratio`** and **`s80_s20_ratio`****Visualization Descriptions:**## Discussion## References\[1\] Source Data link : https://ourworldindata.org/grapher/world-population-in-extreme-poverty-absolute?time=earliest..2015